﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FlickrXplorer.Web.Plugin;
using FlickrXplorer.Web.Objects;

namespace MyFlickrXplorerPlugins
{
  public class FluentPlugin : FlickrXplorerPlugin
  {
    public FluentPlugin() : base("My Fluent Plugin")
    {
      this.When().MainPhotoIsLoading.GetTitleFrom(GetTitle).And.GetBodyFrom(GetBody);
    }

    public string GetTitle(PhotoDetail photoDetail)
    {
      return photoDetail.Title;
    }

    public string GetBody(PhotoDetail photoDetail)
    {
      return "Created by: " + photoDetail.Username;
    }
  }
}
